@extends('admin.layouts.master')
@section('content')
    <link rel="stylesheet" href="{{url('/css/app.css')}}">
            <div class="col-md-12">
                <!-- 自定义内容区域 -->
                <div class="panel panel-default">
                    <div class="panel-heading">添加权限</div>
                    <div class="panel-body">
                        <form class="form-horizontal" action="{{url('admin/admin_permission/store')}}"  method="post" >
                            {{csrf_field()}}
                            <div class="form-group">
                                <label for="name" class="col-sm-2 control-label">所属的权限组</label>

                                <div class="col-sm-5">
                                    <select name="parent_id">
                                        <option value="0">顶级权限</option>
                                        @foreach($permissions as $permission)
                                            <option value="{{$permission->id}}">{{$permission->name}}</option>
                                        @endforeach
                                    </select>
                                </div>

                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">权限路由：</label>

                                <div class="col-sm-5">

                                    <input type="text" name="display_name">

                                </div>

                            </div>
                            <div class="form-group">
                                <label for="age" class="col-sm-2 control-label">权限名称：</label>

                                <div class="col-sm-5">
                                    <input type="text" name="name">
                                </div>

                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">权限描述：</label>

                                <div class="col-sm-5">

                                    <textarea name="description" id="" cols="30" rows="10"></textarea>

                                </div>

                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="submit" id="addpermission" class="btn btn-primary">提交</button>

                                    <button type="submit" onclick="history.go(-1)" class="back btn btn-primary">返回</button>

                                </div>
                            </div>
                        </form>
                    </div>
                </div>

            </div>
@endsection
